package com.ruoyi.zhjd.exp.modules.videomonitor.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.zhjd.exp.modules.videomonitor.dto.VideoMonitorTreeDto;
import com.ruoyi.zhjd.exp.modules.videomonitor.entity.VideoMonitorEntity;
import com.ruoyi.zhjd.exp.modules.videomonitor.service.LaboratoryVideoMonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

// import com.qzsoft.jeemis.common.utils.Result;
// import com.qzsoft.zhjd.common.utils.ResultUtils;

/**
 * @ClassName LaboratoryVideoMonitorController
 * @Description 水稳视频监控
 * @author linhuawei
 * @since 2022-03-23
 */
@RestController
@RequestMapping("/api/laboratoryVideoMonitor")
public class LaboratoryVideoMonitorController {

    @Autowired
    private LaboratoryVideoMonitorService laboratoryVideoMonitorService;

//    @Autowired
//    private VideoMonitorService videoMonitorService;

    /**
     * @Title tree
     * @Description 获取视频树(基地获取实验室)
     * @return 视频树
     */
    @GetMapping("/tree")
    public R<List<VideoMonitorTreeDto>> tree() {
        List<VideoMonitorTreeDto> list = laboratoryVideoMonitorService.tree();
        return R.ok(list);
    }

//    /**
//     * @Title list
//     * @Description 获取实验室摄像头列表
//     * @return
//     */
//    @GetMapping("/list")
//    public R<List<VideoMonitorEntity>> list(@RequestParam(required = true) String resourceId) {
//        Map<String, Object> params = new HashMap<String, Object>();
//        params.put("resourceId", resourceId);
//        params.put("resourceType", VideoMonitorEnums.laboratory.name());
//        List<VideoMonitorEntity> list = videoMonitorService.list(params);
//        return R.ok(list);
//    }

//    /**
//     * @Title getStreamInfo
//     * @Description 获取播放信息
//     * @param app
//     * @param stream
//     * @return
//     */
//    @GetMapping("/getStreamInfo")
//    public R<StreamInfoDto> getStreamInfo(@RequestParam(required = true) String app,
//            @RequestParam(required = true) String stream) {
//        StreamInfoDto data = videoMonitorService.getStreamInfo(app, stream, VideoMonitorEnums.laboratory.name());
//        return R.ok(data);
//    }

}
